import request from '@/utils/request'
//http://localhost:8001/eduservice/teacher/list
//const api_name = 'http://localhost:8001/eduservice/teacher';
export default {
    getList() {
        return request({
            url: `/itemClient/list`,
            method: 'get'
        });
    },
    getPageList(page, limit, itemQuery) {
        return request({
            url: `/itemClient/${page}/${limit}`,
            method: 'post',
            data: itemQuery
        });
    },
    deleteItem(id){
        return request({
            url: `/itemClient/${id}`,
            method: 'delete',
        });
    },
    //添加商品
    addItem(item) {
        return request({
            url: `/itemClient/add`,
            method: 'post',
            data: item
          })
    },
    //根据id查询商品
    getItemInfo(id) {
        return request({
            url: `/itemClient/${id}`,
            method: 'get'
          })
    },
    //修改商品信息
    updateItemInfo(item) {
        return request({
            url: `/itemClient/updateItem`,
            method: 'post',
            data: item
          })
    }
}
